const express = require('express');

const app = express();

const {
  router1
} = require('./1');
const { routerAdmin } = require('./admin');

// use the router and 401 anything falling through
app.use('/admin', routerAdmin, function (req, res) {
  res.sendStatus(401)
})
// mount the router on the app
app.use('/user', router1);

app.listen(9000, () => {
  console.log('middware route start');
})